home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 December / 2004-12 CHIP.iso / Narzedzia systemowe / Inno Setup 5.0.4 Beta / isetup-5.0.4-beta.exe / {app} / Examples / UninstallCodeExample1.iss (.txt) < prev   
Encoding:
Inno Setup Script  |  2004-07-23  |  1.4 KB  |  36 lines

  1. ; -- UninstallCodeExample1.iss --
  2. ; This script shows various things you can achieve using a [Code] section for Uninstall
  3. [Setup]
  4. AppName=My Program
  5. AppVerName=My Program version 1.5
  6. DefaultDirName={pf}\My Program
  7. DefaultGroupName=My Program
  8. UninstallDisplayIcon={app}\MyProg.exe
  9. [Files]
  10. Source: "MyProg.exe"; DestDir: "{app}"
  11. Source: "MyProg.hlp"; DestDir: "{app}"
  12. Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
  13. [Code]
  14. function InitializeUninstall(): Boolean;
  15. begin
  16.   Result := MsgBox('InitializeUninstall:' #13#13 'Uninstall is initializing. Do you really want to start Uninstall?', mbConfirmation, MB_YESNO) = idYes;
  17.   if Result = False then
  18.     MsgBox('InitializeUninstall:' #13#13 'Ok, bye bye.', mbInformation, MB_OK);
  19. procedure DeinitializeUninstall();
  20. begin
  21.   MsgBox('DeinitializeUninstall:' #13#13 'Bye bye!', mbInformation, MB_OK);
  22. procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
  23. begin
  24.   case CurUninstallStep of
  25.     usUninstall:
  26.       begin
  27.         MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall is about to start.', mbInformation, MB_OK)
  28.         // ...insert code to perform pre-uninstall tasks here...
  29.       end;
  30.     usPostUninstall:
  31.       begin
  32.         MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall just finished.', mbInformation, MB_OK);
  33.         // ...insert code to perform post-uninstall tasks here...
  34.       end;
  35.   end;
  36.